package com.itheima.sh.controller;

import com.itheima.sh.mapper.UserMapper;
import com.itheima.sh.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description:
 * @Version: V1.0
 */
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    UserMapper userMapper;

    @GetMapping
    public List<User> findAll(){
        return userMapper.findAll();
    }
}
